﻿using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IceDog.EFCore.Cmd.OfficalDemo.Models
{
    /// <summary>
    /// 评论（回复）
    /// </summary>
    public class Post
    {
        /// <summary>
        /// 评论id
        /// </summary>
        [Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]//主键，自动递增
        public int PostId { get; set; }
        /// <summary>
        /// 评论标题
        /// </summary>
        public string Title { get; set; }
        /// <summary>
        /// 评论内容
        /// </summary>
        public string Content { get; set; }
        /// <summary>
        /// 博客id
        /// </summary>
        public int BlogId { get; set; }
        /// <summary>
        /// 博客
        /// </summary>
        public Blog Blog { get; set; }
    }
}
